package 题目集.hash.基数排序;

import java.util.Scanner;

/**
 * https://ac.nowcoder.com/acm/contest/82672/C
 */
public class C滚动数组 {
    static int maxN = (int) 2e5 + 10;
    static int[] src = new int[maxN];
    static int n, k;

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        k = sc.nextInt();
        for (int i = 1; i <= n; i++) {
            src[i] = sc.nextInt();
        }
        boolean[] counts = new boolean[n];
        for (int i = 1; i <= n; i++) {
            counts[(src[i] - i + n) % n] = true;
        }
        if (!counts[0]) {
            System.out.println("No");
            return;
        }
        int cnt = count(counts);
        counts=new boolean[n];
        for (int i = 1; i <= n; i++) {
            counts[(i - src[i] + n) % n] = true;
        }
        cnt = Math.max(cnt, count(counts));
        if (cnt >= k || cnt >= 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static int count(boolean[] counts) {
        for (int i = 0; i < counts.length; i++) {
            if (!counts[i]) {
                return i;
            }
        }
        return counts.length;
    }
}
